Skip to content

test: raise line coverage - #65

Merged
roxblnfk merged 2 commits into
1.xfrom
test/coverage
Nov 20, 2026
Merged

roxblnfk merged 2 commits into
1.xfrom
test/coverage

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • Unit: the Laravel ActiveRecordProvider and the Yii 3 bootstrap hand their container to the Facade.
  • Unit: the deprecated Cycle\ActiveRecord\TransactionMode and …\Exception\Transaction\TransactionException names resolve to the cycle/transaction classes.
  • Unit: ActiveQuery builds a select for its role on the ORM the Facade resolves.

Why?

Codecov on 1.x showed 95% (86.7% on the repository page, which still reads the stale master branch): the two framework bridges and the two alias files had no test. The ActiveQuery miss came from pcov on PHP 8.5+: the Unit suite never loaded the class, so its report listed the constructor signature line from static analysis, a line the database suites do not report for executed code, and Codecov merged it as missed.

Review notes

  • Codecov (merged flags): 95.0% → 100% (5 → 0 missed lines).

  • With pcov on PHP 8.5 in docker, Unit + SQLite merged the way Codecov does: 109/109 lines.

  • Locally with Xdebug the report still lists the declaration lines of ActiveRecordException and ConfigurationException (both used by FacadeTest); pcov does not count them as executable, so they do not reach Codecov.

Checklist

  • Tested
    • Unit and Acceptance/SQLite suites pass locally
    • Unit tests added

…uery in the Unit suite

On PHP 8.5 the Unit report marked the ActiveQuery constructor as an unexecuted line no other suite reports, which Codecov counted as missed.

Assisted-By: Claude Opus 5.5 <[email protected]>
@roxblnfk
roxblnfk requested a review from a team November 20, 2026 20:04
@roxblnfk
roxblnfk requested a review from lotyp as a code owner November 20, 2026 20:04
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d2ec332) to head (e996dd9).

Additional details and impacted files
@@             Coverage Diff             @@
##              1.x       #65      +/-   ##
===========================================
+ Coverage   95.00%   100.00%   +5.00%     
===========================================
  Files          10        10              
  Lines         100        99       -1     
===========================================
+ Hits           95        99       +4     
+ Misses          5         0       -5     
Flag Coverage Δ
mysql 82.82% <ø> (ø)
postgres 82.82% <ø> (ø)
sqlite 82.82% <ø> (ø)
sqlserver 82.82% <ø> (ø)
unit 25.25% <ø> (+8.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roxblnfk
roxblnfk merged commit f2e29cd into 1.x Nov 20, 2026
26 checks passed
@roxblnfk
roxblnfk deleted the test/coverage branch November 20, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant